package com.qqt.csr.im.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 人工客服 im 账户信息
 * @author yang hao
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("csr_im_account")
@ToString
@Schema(description="人工客服 im 账户信息")
@JsonIgnoreProperties(ignoreUnknown = true)
public class Account implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
    * 主键
    */
    @Schema(description="主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "账户用户id")
    private String accountUserId;

    @Schema(description = "账户姓名")
    private String accountName;

    /**
    * 头像
    */
    @Schema(description="头像")
    private String headImg;

    /**
    * 是否在线
    */
    @Schema(description="是否在线")
    private Integer type;

    /**
    * 扩展 json格式
    */
    @Schema(description="扩展 json格式")
    private String ext;

    /**
    * 创建时间
    */
    @Schema(description="创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
    * 更新时间
    */
    @Schema(description="更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
}